<template>
  <div>
    <el-pagination v-model:currentPage="categories.categoriesQuery.pagenum"
      v-model:page-size="categories.categoriesQuery.pagesize" :page-sizes="[1, 5, 10, 20, 30, 50]" :small="false"
      :disabled="false" :background="true" layout="total, sizes, prev, pager, next, jumper" :total="categories.total"
      @size-change="handleSizeChange" @current-change="handleCurrentChange" />
  </div>
</template>

<script setup>
import useStore from '@/pinia/index.js';
const { categories } = useStore();

// newPage:当前页码,自带参数
function handleCurrentChange() {
  categories.REQUEST_categoriesList();
}

// newSize:当前页要显示的条数,自带参数
function handleSizeChange() {
  categories.REQUEST_categoriesList();
}
</script>

<style scoped>
</style>